import { Modal } from 'ant-design-vue'

interface config {
  title?: string,
  content: string
}

export const vConfirm = (config:config) => {
  return new Promise((resolve, reject) => {
    Modal.confirm({
      title: config.title ? config.title : '提示',
      content: config.content,
      onOk() {
        resolve(null)
      },
      onCancel() {
        reject()
      }
    })
  })
}
